<template>
    <div class="content-body">
        <el-table
            :data="tableData"
            row-key="id"
            border>
            <el-table-column prop="id" label="ID" width="60"/>
        </el-table>
        <page 
            :pageTotal="count"
            @get-list="searchPage"/>
    </div>
</template>
<script>
import page from '@/components/page.vue'
export default {
    data(){
        return {
            tableData: [],
            count: 0,
            forms: {
                page: 1,
                limit: 10,
            },
        }
    },
    methods:{
        // 页面初始化
        initData(){
            var that = this
        },
        // 分页数据加载
        searchPage(res){
            this.forms.page = res.page
            this.forms.limit = res.limit
            this.initData()
        },
    },
    mounted(){
        this.initData()
    },
    components: {
        page,
    }
}
</script>
<style>
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
</style>
  